<?php

class MidAutumnSetAvatarImgAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * 设置当前的头像
     * @param $userId
     * @param $imgId
     * @param $reqTime
     * @return SzResponse
     * @throws SzException
     */
    public function execute($userId, $imgId, $reqTime)
    {
        GameService::get()->validateMultiRequestTimeDelta($userId, $reqTime);

        return $this->buildResponse(
            MidAutumnService::get()->setAvatarImg($userId, $imgId, $reqTime)
        );
    }
}